package net.pinnoocle.playdao.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import net.pinnoocle.playdao.entity.Script;
import net.pinnoocle.playdao.entity.ScriptLibrary;
import net.pinnoocle.playdao.entity.ScriptLibraryRole;
import net.pinnoocle.playdao.entity.shopPc.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 剧本基本信息(Script)表数据库访问层
 *
 * @author ye
 * @since 2021-10-20 20:21:44
 */
@Mapper
public interface ScriptDao extends BaseMapper<Script> {

    /**
     * 店铺剧本列表
     * @param page
     * @param params
     * @return
     */
    Page<ScriptListVo> scriptList(Page page,@Param("params") ScriptListSearchParams params);

    /**
     * 批量设置剧本角色状态
     * @param scriptId
     * @return
     */
    boolean batchDisableScriptRole(@Param("scriptId") String scriptId,
                                   @Param("disable") Integer disable);

    /**
     * 剧本分类列表---分页
     * @param page
     * @return
     */
    Page<ScriptCateListPageVo> cateListWithPage(Page page,@Param("param")BaseShopSearch param);

    /**
     * 剧本标签列表---分页
     * @param page
     * @return
     */
    Page<ScriptLabelListPageVo> labelListWithPage(Page page,@Param("param")BaseShopSearch param);

    /**
     * 剧本级别列表---分页
     * @param page
     * @return
     */
    Page<ScriptLevelListPageVo> levelListWithPage(Page page,@Param("param")BaseShopSearch param);

    List<ScriptLibrary> scriptLibraryInit();

    List<ScriptLibraryRole> scriptLibraryRole(Integer scriptId);

    /**
     * 剧本库列表
     * @param page
     * @param params
     * @return
     */
    Page<ScriptLibraryListPageVo> scriptLibrary(Page page,@Param("params") ScriptLibraryListSearchParams params);
}